﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using System.Linq;
using Telerik.WinControls.UI;
using TZ.Common;
using MN.Framework;
using MN.Framework.UI.Win;
using Telerik.WinControls.Themes;
using MN.Framework.Common.Security;
using MN.Framework.UI.Win.Forms;

namespace WindowsFormsApplicationPezeshki
{
    public partial class MainForm : MnMainForm
    {
        public MainForm()
        {
            InitializeComponent();

            AddMainEntity<Person>();
            AddMainEntity<Purchase>();
            AddMainEntity<MedicalAppointment>();
            AddMainEntity<MedicalService>();
            AddMainEntity<Reception>(new MnWinView<Reception>(true, "DateTime", "ServiceDesc", "ServiceCost"));
            AddMainEntity<ServicePrice>();

            AddSettingEntity<ReserveType>();
            AddSubMenuEntity<User>(SubMenuType.Security, new SecurityContext("DatabasePezeshkiEntities"));
            AddSubMenuEntity<Role>(SubMenuType.Security, new SecurityContext("DatabasePezeshkiEntities"));
            AddSubMenuEntity<UsersInRole>(SubMenuType.Security, new SecurityContext("DatabasePezeshkiEntities"));

        }

        public override MN.Framework.Common.BaseContext DBContext
        {
            get { return new TzContext(); }
        }
    }
}

